package com.fy.tt.dao;

import com.fy.toolhelper.db.IBaseDao;
import com.fy.tt.entity.Word;
import com.fy.tt.entity.query.SemanticQuery;
import com.fy.tt.entity.query.WordQuery;
import com.fy.tt.entity.vo.WordAndSemanticVo;
import com.fy.tt.entity.vo.WordVo;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface WordDao extends IBaseDao<Word> {
    List<WordVo> getAllWords(Connection connection) throws SQLException;

    int getTotalWord(Connection connection, WordQuery wordQuery) throws SQLException;

    int deleteWord(Connection connection, int id) throws SQLException;

    // 分页查询
    List<Word> getPageWords(Connection connection, int pageSize, int current) throws SQLException;
    // 分页多条件查询
    List<WordVo> getConditionPageWords(Connection connection, WordQuery wordQuery, int pageSize, int current) throws SQLException;

    List<WordAndSemanticVo> getWordSemantic(Connection connection) throws SQLException;

    List<WordAndSemanticVo> getAllWordSemantic(Connection connection) throws SQLException;

    List<WordAndSemanticVo> getConditionPageAllWordSemantic(Connection connection, SemanticQuery semanticQuery, int pageSize, int current) throws SQLException;

    List<WordAndSemanticVo> getConditionPageWordSemanticDeveloped(Connection dbConnection, SemanticQuery semanticQuery, Integer pageSize, Integer current) throws SQLException;
}
